#include "precomp.h"
#include <vector>
#include "Material.h"

#include "Generated/SimpleMaterialAspectParams.h"
#include "Generated/WaterMaterialAspectParams.h"


int main()
{
	//Material mat;
	//{
	//MaterialBuilder mat_builder(mat);
	//mat_builder.declareAspect<SimpleMaterialAspectParams>();
	//mat_builder.declareAspect<WaterMaterialAspectParams>();
	//mat_builder.declareAspect<WaterMaterialAspectParams>();
	//mat_builder.declareAspect<SimpleMaterialAspectParams>();
	//mat_builder.declareAspect<WaterMaterialAspectParams>();
	//mat_builder.lockMaterial();
	//SimpleMaterialAspectParams *simple = mat_builder.createAspect<SimpleMaterialAspectParams>();
	//simple->bugaga = 0.1f;
	//simple->uhaha = 0.2f;
	//WaterMaterialAspectParams *water = mat_builder.createAspect<WaterMaterialAspectParams>();
	//water->deepColor = D3DXVECTOR3(0, 0.5f, 1.5f);
	//mat_builder.createAspect<WaterMaterialAspectParams>();
	//mat_builder.createAspect<SimpleMaterialAspectParams>();
	//mat_builder.createAspect<WaterMaterialAspectParams>();
	//mat_builder.unlockMaterial();
	//}
	//for (Material::AspectIterator i = mat.aspectsBegin(); i != mat.aspectsEnd(); ++i)
	//{
	//	Semantic_t sem = i.getAspectSemantic();
	//	printf("%i\n", sem);
	//	switch (sem)
	//	{
	//	case MaterialAspect::Simple:
	//		{
	//			printf("Simple Aspect\n", sem);
	//			SimpleMaterialAspectParams *params = i.getAspect<SimpleMaterialAspectParams>();
	//			printf("%f\n", params->uhaha);
	//			printf("%f\n", params->bugaga);
	//		}
	//		break;
	//	case MaterialAspect::Water:
	//		{
	//			printf("Water Aspect\n", sem);
	//			WaterMaterialAspectParams *params = i.getAspect<WaterMaterialAspectParams>();
	//			printf("%f %f %f\n", params->deepColor.x, params->deepColor.y, params->deepColor.z);
	//		}
	//		break;
	//	}
	//}
}

